package com.glacier.framework.boot.autoconfigure.rest;

import com.glacier.framework.boot.rest.exception.RestExceptionHandler;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * date 2023-12-30 10:51
 * 异常处理自动配置类
 * @author glacier
 * @version 1.0
 */
@Configuration
@ConditionalOnClass(RestExceptionHandler.class)
public class RestExceptionHandlerAutoConfiguration {
    @Bean
    @ConditionalOnMissingBean
    RestExceptionHandler restExceptionHandler(){
        return new RestExceptionHandler();
    }
}
